from struct import unpack
from binascii import hexlify


def decode_flags(flags):
    if len(flags) != 1:
        raise Exception("Flags must be 1 byte")

    bitfield = (
        'LE Limited Discoverable Mode',
        'LE General Discoverable Mode',
        'BR/EDR Not Supported',
        'Simultaneous LE and BR/EDR (Controller)',
        'Simultaneous LE and BR/EDR (Host)',
        'Reserved', 'Reserved', 'Reserved',  # silly hack
    )

    res = []
    flags = ord(flags)
    for i in range(0, len(bitfield)):
        value = bitfield[i]
        if flags & 1 << i:
            res.append(value)
    return res


def decode_uuid16(uuids):
    if len(uuids) % 2 != 0:
        raise Exception("List of 16-bit UUIDs must be a multiple of 2 bytes")
    res = []
    for i in range(0, len(uuids), 2):
        res.append('%04x' % unpack('<H', uuids[i:i + 2]))
    return res


def decode_uuid128(uuids):
    if len(uuids) % 16 != 0:
        raise Exception("List of 128-bit UUIDs must be a multiple of 16 bytes")
    res = []
    for i in range(0, len(uuids), 16):
        r = uuids[i:i + 16][::-1]
        res.append('-'.join(map(lambda x: hexlify(x), (r[0:4], r[4:6], r[6:8], r[8:10], r[10:]))))
    return res


def decode_tx_power_level(power):
    if len(power) != 1:
        raise Exception("Power level must be 1 byte")
    return '%d dBm' % unpack('b', power)


def decode_slave_connection_interval_range(range):
    if len(range) != 4:
        raise Exception("Range must be 4 bytes")
    return map(lambda x: '%g ms' % (unpack('<H', x)[0] * 1.25,), (range[0:2], range[2:]))


def decode_name(data):
    return data


def decode_service_data(data):
    if len(data) < 2:
        raise Exception("Service data must be at least 2 bytes")

    uuid, data = (data[0:2], data[2:])
    uuid = '%04x' % unpack('<H', uuid)
    return (uuid, data)


# manufacturers as defined by the Bluetooth SIG
# (https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers). Last updates 3/5/18
GAP_MANUFACTURERS = {
    0x0000: 'Ericsson Technology Licensing',
    0x0001: 'Nokia Mobile Phones',
    0x0002: 'Intel Corp.',
    0x0003: 'IBM Corp.',
    0x0004: 'Toshiba Corp.',
    0x0005: '3Com',
    0x0006: 'Microsoft',
    0x0007: 'Lucent',
    0x0008: 'Motorola',
    0x0009: 'Infineon Technologies AG',
    0x000a: 'Cambridge Silicon Radio',
    0x000b: 'Silicon Wave',
    0x000c: 'Digianswer A/S',
    0x000d: 'Texas Instruments Inc.',
    0x000e: 'Parthus Technologies Inc.',
    0x000f: 'Broadcom Corporation',
    0x0010: 'Mitel Semiconductor',
    0x0011: 'Widcomm, Inc.',
    0x0012: 'Zeevo, Inc.',
    0x0013: 'Atmel Corporation',
    0x0014: 'Mitsubishi Electric Corporation',
    0x0015: 'RTX Telecom A/S',
    0x0016: 'KC Technology Inc.',
    0x0017: 'Newlogic',
    0x0018: 'Transilica, Inc.',
    0x0019: 'Rohde &amp; Schwarz GmbH &amp; Co. KG',
    0x001a: 'TTPCom Limited',
    0x001b: 'Signia Technologies, Inc.',
    0x001c: 'Conexant Systems Inc.',
    0x001d: 'Qualcomm',
    0x001e: 'Inventel',
    0x001f: 'AVM Berlin',
    0x0020: 'BandSpeed, Inc.',
    0x0021: 'Mansella Ltd',
    0x0022: 'NEC Corporation',
    0x0023: 'WavePlus Technology Co., Ltd.',
    0x0024: 'Alcatel',
    0x0025: 'NXP Semiconductors (formerly Philips Semiconductors)',
    0x0026: 'C Technologies',
    0x0027: 'Open Interface',
    0x0028: 'R F Micro Devices',
    0x0029: 'Hitachi Ltd',
    0x002a: 'Symbol Technologies, Inc.',
    0x002b: 'Tenovis',
    0x002c: 'Macronix International Co. Ltd.',
    0x002d: 'GCT Semiconductor',
    0x002e: 'Norwood Systems',
    0x002f: 'MewTel Technology Inc.',
    0x0030: 'ST Microelectronics',
    0x0031: 'Synopsys, Inc.',
    0x0032: 'Red-M (Communications) Ltd',
    0x0033: 'Commil Ltd',
    0x0034: 'Computer Access Technology Corporation (CATC)',
    0x0035: 'Eclipse (HQ Espana) S.L.',
    0x0036: 'Renesas Electronics Corporation',
    0x0037: 'Mobilian Corporation',
    0x0038: 'Terax',
    0x0039: 'Integrated System Solution Corp.',
    0x003a: 'Matsushita Electric Industrial Co., Ltd.',
    0x003b: 'Gennum Corporation',
    0x003c: 'BlackBerry Limited  (formerly Research In Motion)',
    0x003d: 'IPextreme, Inc.',
    0x003e: 'Systems and Chips, Inc',
    0x003f: 'Bluetooth SIG, Inc',
    0x0040: 'Seiko Epson Corporation',
    0x0041: 'Integrated Silicon Solution Taiwan, Inc.',
    0x0042: 'CONWISE Technology Corporation Ltd',
    0x0043: 'PARROT AUTOMOTIVE SAS',
    0x0044: 'Socket Mobile',
    0x0045: 'Atheros Communications, Inc.',
    0x0046: 'MediaTek, Inc.',
    0x0047: 'Bluegiga',
    0x0048: 'Marvell Technology Group Ltd.',
    0x0049: '3DSP Corporation',
    0x004a: 'Accel Semiconductor Ltd.',
    0x004b: 'Continental Automotive Systems',
    0x004c: 'Apple, Inc.',
    0x004d: 'Staccato Communications, Inc.',
    0x004e: 'Avago Technologies',
    0x004f: 'APT Ltd.',
    0x0050: 'SiRF Technology, Inc.',
    0x0051: 'Tzero Technologies, Inc.',
    0x0052: 'J&amp;M Corporation',
    0x0053: 'Free2move AB',
    0x0054: '3DiJoy Corporation',
    0x0055: 'Plantronics, Inc.',
    0x0056: 'Sony Ericsson Mobile Communications',
    0x0057: 'Harman International Industries, Inc.',
    0x0058: 'Vizio, Inc.',
    0x0059: 'Nordic Semiconductor ASA',
    0x005a: 'EM Microelectronic-Marin SA',
    0x005b: 'Ralink Technology Corporation',
    0x005c: 'Belkin International, Inc. ',
    0x005d: 'Realtek Semiconductor Corporation',
    0x005e: 'Stonestreet One, LLC',
    0x005f: 'Wicentric, Inc.',
    0x0060: 'RivieraWaves S.A.S',
    0x0061: 'RDA Microelectronics',
    0x0062: 'Gibson Guitars',
    0x0063: 'MiCommand Inc.',
    0x0064: 'Band XI International, LLC',
    0x0065: 'Hewlett-Packard Company',
    0x0066: '9Solutions Oy',
    0x0067: 'GN Netcom A/S',
    0x0068: 'General Motors',
    0x0069: 'A&amp;D Engineering, Inc.',
    0x006a: 'MindTree Ltd.',
    0x006b: 'Polar Electro OY',
    0x006c: 'Beautiful Enterprise Co., Ltd.',
    0x006d: 'BriarTek, Inc',
    0x006e: 'Summit Data Communications, Inc.',
    0x006f: 'Sound ID',
    0x0070: 'Monster, LLC',
    0x0071: 'connectBlue AB',
    0x0072: 'ShangHai Super Smart Electronics Co. Ltd.',
    0x0073: 'Group Sense Ltd. ',
    0x0074: 'Zomm, LLC',
    0x0075: 'Samsung Electronics Co. Ltd.',
    0x0076: 'Creative Technology Ltd.',
    0x0077: 'Laird Technologies',
    0x0078: 'Nike, Inc.',
    0x0079: 'lesswire AG',
    0x007a: 'MStar Semiconductor, Inc.',
    0x007b: 'Hanlynn Technologies',
    0x007c: 'A &amp; R Cambridge',
    0x007d: 'Seers Technology Co., Ltd.',
    0x007e: 'Sports Tracking Technologies Ltd.',
    0x007f: 'Autonet Mobile',
    0x0080: 'DeLorme Publishing Company, Inc.',
    0x0081: 'WuXi Vimicro',
    0x0082: 'Sennheiser Communications A/S',
    0x0083: 'TimeKeeping Systems, Inc.',
    0x0084: 'Ludus Helsinki Ltd.',
    0x0085: 'BlueRadios, Inc.',
    0x0086: 'Equinux AG',
    0x0087: 'Garmin International, Inc.',
    0x0088: 'Ecotest',
    0x0089: 'GN ReSound A/S',
    0x008a: 'Jawbone',
    0x008b: 'Topcon Positioning Systems, LLC',
    0x008c: 'Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.)',
    0x008d: 'Zscan Software',
    0x008e: 'Quintic Corp',
    0x008f: 'Telit Wireless Solutions GmbH (formerly Stollmann E+V GmbH)',
    0x0090: 'Funai Electric Co., Ltd.',
    0x0091: 'Advanced PANMOBIL systems GmbH &amp; Co. KG',
    0x0092: 'ThinkOptics, Inc. ',
    0x0093: 'Universal Electronics, Inc.',
    0x0094: 'Airoha Technology Corp.',
    0x0095: 'NEC Lighting, Ltd.',
    0x0096: 'ODM Technology, Inc.',
    0x0097: 'ConnecteDevice Ltd.',
    0x0098: 'zero1.tv GmbH',
    0x0099: 'i.Tech Dynamic Global Distribution Ltd.',
    0x009a: 'Alpwise',
    0x009b: 'Jiangsu Toppower Automotive Electronics Co., Ltd.',
    0x009c: 'Colorfy, Inc.',
    0x009d: 'Geoforce Inc.',
    0x009e: 'Bose Corporation',
    0x009f: 'Suunto Oy',
    0x00a0: 'Kensington Computer Products Group',
    0x00a1: 'SR-Medizinelektronik',
    0x00a2: 'Vertu Corporation Limited',
    0x00a3: 'Meta Watch Ltd.',
    0x00a4: 'LINAK A/S',
    0x00a5: 'OTL Dynamics LLC',
    0x00a6: 'Panda Ocean Inc.',
    0x00a7: 'Visteon Corporation',
    0x00a8: 'ARP Devices Limited',
    0x00a9: 'Magneti Marelli S.p.A',
    0x00aa: 'CAEN RFID srl',
    0x00ab: 'Ingenieur-Systemgruppe Zahn GmbH',
    0x00ac: 'Green Throttle Games',
    0x00ad: 'Peter Systemtechnik GmbH',
    0x00ae: 'Omegawave Oy',
    0x00af: 'Cinetix',
    0x00b0: 'Passif Semiconductor Corp',
    0x00b1: 'Saris Cycling Group, Inc',
    0x00b2: 'Bekey A/S',
    0x00b3: 'Clarinox Technologies Pty. Ltd.',
    0x00b4: 'BDE Technology Co., Ltd.',
    0x00b5: 'Swirl Networks',
    0x00b6: 'Meso international',
    0x00b7: 'TreLab Ltd',
    0x00b8: 'Qualcomm Innovation Center, Inc. (QuIC)',
    0x00b9: 'Johnson Controls, Inc.',
    0x00ba: 'Starkey Laboratories Inc.',
    0x00bb: 'S-Power Electronics Limited',
    0x00bc: 'Ace Sensor Inc',
    0x00bd: 'Aplix Corporation',
    0x00be: 'AAMP of America',
    0x00bf: 'Stalmart Technology Limited',
    0x00c0: 'AMICCOM Electronics Corporation',
    0x00c1: 'Shenzhen Excelsecu Data Technology Co.,Ltd',
    0x00c2: 'Geneq Inc.',
    0x00c3: 'adidas AG',
    0x00c4: 'LG Electronics',
    0x00c5: 'Onset Computer Corporation',
    0x00c6: 'Selfly BV',
    0x00c7: 'Quuppa Oy.',
    0x00c8: 'GeLo Inc',
    0x00c9: 'Evluma',
    0x00ca: 'MC10',
    0x00cb: 'Binauric SE',
    0x00cc: 'Beats Electronics',
    0x00cd: 'Microchip Technology Inc.',
    0x00ce: 'Elgato Systems GmbH',
    0x00cf: 'ARCHOS SA',
    0x00d0: 'Dexcom, Inc.',
    0x00d1: 'Polar Electro Europe B.V.',
    0x00d2: 'Dialog Semiconductor B.V.',
    0x00d3: 'Taixingbang Technology (HK) Co,. LTD.',
    0x00d4: 'Kawantech',
    0x00d5: 'Austco Communication Systems',
    0x00d6: 'Timex Group USA, Inc.',
    0x00d7: 'Qualcomm Technologies, Inc.',
    0x00d8: 'Qualcomm Connected Experiences, Inc.',
    0x00d9: 'Voyetra Turtle Beach',
    0x00da: 'txtr GmbH',
    0x00db: 'Biosentronics',
    0x00dc: 'Procter &amp; Gamble',
    0x00dd: 'Hosiden Corporation',
    0x00de: 'Muzik LLC',
    0x00df: 'Misfit Wearables Corp',
    0x00e0: 'Google',
    0x00e1: 'Danlers Ltd',
    0x00e2: 'Semilink Inc',
    0x00e3: 'inMusic Brands, Inc',
    0x00e4: 'L.S. Research Inc.',
    0x00e5: 'Eden Software Consultants Ltd.',
    0x00e6: 'Freshtemp',
    0x00e7: 'KS Technologies',
    0x00e8: 'ACTS Technologies',
    0x00e9: 'Vtrack Systems',
    0x00ea: 'Nielsen-Kellerman Company',
    0x00eb: 'Server Technology Inc.',
    0x00ec: 'BioResearch Associates',
    0x00ed: 'Jolly Logic, LLC',
    0x00ee: 'Above Average Outcomes, Inc.',
    0x00ef: 'Bitsplitters GmbH',
    0x00f0: 'PayPal, Inc.',
    0x00f1: 'Witron Technology Limited',
    0x00f2: 'Morse Project Inc.',
    0x00f3: 'Kent Displays Inc.',
    0x00f4: 'Nautilus Inc.',
    0x00f5: 'Smartifier Oy',
    0x00f6: 'Elcometer Limited',
    0x00f7: 'VSN Technologies, Inc.',
    0x00f8: 'AceUni Corp., Ltd.',
    0x00f9: 'StickNFind',
    0x00fa: 'Crystal Code AB',
    0x00fb: 'KOUKAAM a.s.',
    0x00fc: 'Delphi Corporation',
    0x00fd: 'ValenceTech Limited',
    0x00fe: 'Stanley Black and Decker',
    0x00ff: 'Typo Products, LLC',
    0x0100: 'TomTom International BV',
    0x0101: 'Fugoo, Inc.',
    0x0102: 'Keiser Corporation',
    0x0103: 'Bang &amp; Olufsen A/S',
    0x0104: 'PLUS Location Systems Pty Ltd',
    0x0105: 'Ubiquitous Computing Technology Corporation',
    0x0106: 'Innovative Yachtter Solutions',
    0x0107: 'William Demant Holding A/S',
    0x0108: 'Chicony Electronics Co., Ltd.',
    0x0109: 'Atus BV',
    0x010a: 'Codegate Ltd',
    0x010b: 'ERi, Inc',
    0x010c: 'Transducers Direct, LLC',
    0x010d: 'Fujitsu Ten LImited',
    0x010e: 'Audi AG',
    0x010f: 'HiSilicon Technologies Col, Ltd.',
    0x0110: 'Nippon Seiki Co., Ltd.',
    0x0111: 'Steelseries ApS',
    0x0112: 'Visybl Inc.',
    0x0113: 'Openbrain Technologies, Co., Ltd.',
    0x0114: 'Xensr',
    0x0115: 'e.solutions',
    0x0116: '10AK Technologies',
    0x0117: 'Wimoto Technologies Inc',
    0x0118: 'Radius Networks, Inc.',
    0x0119: 'Wize Technology Co., Ltd.',
    0x011a: 'Qualcomm Labs, Inc.',
    0x011b: 'Hewlett Packard Enterprise',
    0x011c: 'Baidu',
    0x011d: 'Arendi AG',
    0x011e: 'Skoda Auto a.s.',
    0x011f: 'Volkswagen AG',
    0x0120: 'Porsche AG',
    0x0121: 'Sino Wealth Electronic Ltd.',
    0x0122: 'AirTurn, Inc.',
    0x0123: 'Kinsa, Inc',
    0x0124: 'HID Global',
    0x0125: 'SEAT es',
    0x0126: 'Promethean Ltd.',
    0x0127: 'Salutica Allied Solutions',
    0x0128: 'GPSI Group Pty Ltd',
    0x0129: 'Nimble Devices Oy',
    0x012a: 'Changzhou Yongse Infotech  Co., Ltd.',
    0x012b: 'SportIQ',
    0x012c: 'TEMEC Instruments B.V.',
    0x012d: 'Sony Corporation',
    0x012e: 'ASSA ABLOY',
    0x012f: 'Clarion Co. Inc.',
    0x0130: 'Warehouse Innovations',
    0x0131: 'Cypress Semiconductor',
    0x0132: 'MADS Inc',
    0x0133: 'Blue Maestro Limited',
    0x0134: 'Resolution Products, Ltd.',
    0x0135: 'Aireware LLC',
    0x0136: 'Silvair, Inc.',
    0x0137: 'Prestigio Plaza Ltd.',
    0x0138: 'NTEO Inc.',
    0x0139: 'Focus Systems Corporation',
    0x013a: 'Tencent Holdings Ltd.',
    0x013b: 'Allegion',
    0x013c: 'Murata Manufacturing Co., Ltd. ',
    0x013d: 'WirelessWERX',
    0x013e: 'Nod, Inc.',
    0x013f: 'B&amp;B Manufacturing Company',
    0x0140: 'Alpine Electronics (China) Co., Ltd',
    0x0141: 'FedEx Services',
    0x0142: 'Grape Systems Inc.',
    0x0143: 'Bkon Connect',
    0x0144: 'Lintech GmbH',
    0x0145: 'Novatel Wireless',
    0x0146: 'Ciright',
    0x0147: 'Mighty Cast, Inc.',
    0x0148: 'Ambimat Electronics',
    0x0149: 'Perytons Ltd.',
    0x014a: 'Tivoli Audio, LLC',
    0x014b: 'Master Lock',
    0x014c: 'Mesh-Net Ltd',
    0x014d: 'HUIZHOU DESAY SV AUTOMOTIVE CO., LTD.',
    0x014e: 'Tangerine, Inc.',
    0x014f: 'B&amp;W Group Ltd.',
    0x0150: 'Pioneer Corporation',
    0x0151: 'OnBeep',
    0x0152: 'Vernier Software &amp; Technology',
    0x0153: 'ROL Ergo',
    0x0154: 'Pebble Technology',
    0x0155: 'NETATMO',
    0x0156: 'Accumulate AB',
    0x0157: 'Anhui Huami Information Technology Co., Ltd.',
    0x0158: 'Inmite s.r.o.',
    0x0159: 'ChefSteps, Inc.',
    0x015a: 'micas AG',
    0x015b: 'Biomedical Research Ltd.',
    0x015c: 'Pitius Tec S.L.',
    0x015d: 'Estimote, Inc.',
    0x015e: 'Unikey Technologies, Inc.',
    0x015f: 'Timer Cap Co.',
    0x0160: 'AwoX',
    0x0161: 'yikes',
    0x0162: 'MADSGlobalNZ Ltd.',
    0x0163: 'PCH International',
    0x0164: 'Qingdao Yeelink Information Technology Co., Ltd.',
    0x0165: 'Milwaukee Tool (Formally Milwaukee Electric Tools) ',
    0x0166: 'MISHIK Pte Ltd',
    0x0167: 'Ascensia Diabetes Care US Inc.',
    0x0168: 'Spicebox LLC',
    0x0169: 'emberlight',
    0x016a: 'Cooper-Atkins Corporation',
    0x016b: 'Qblinks',
    0x016c: 'MYSPHERA',
    0x016d: 'LifeScan Inc',
    0x016e: 'Volantic AB',
    0x016f: 'Podo Labs, Inc',
    0x0170: 'Roche Diabetes Care AG',
    0x0171: 'Amazon Fulfillment Service',
    0x0172: 'Connovate Technology Private Limited',
    0x0173: 'Kocomojo, LLC',
    0x0174: 'Everykey Inc. ',
    0x0175: 'Dynamic Controls',
    0x0176: 'SentriLock',
    0x0177: 'I-SYST inc.',
    0x0178: 'CASIO COMPUTER CO., LTD.',
    0x0179: 'LAPIS Semiconductor Co., Ltd.',
    0x017a: 'Telemonitor, Inc.',
    0x017b: 'taskit GmbH',
    0x017c: 'Daimler AG',
    0x017d: 'BatAndCat',
    0x017e: 'BluDotz Ltd',
    0x017f: 'XTel Wireless ApS',
    0x0180: 'Gigaset Communications GmbH',
    0x0181: 'Gecko Health Innovations, Inc.',
    0x0182: 'HOP Ubiquitous',
    0x0183: 'Walt Disney',
    0x0184: 'Nectar',
    0x0185: 'bel&#39;apps LLC',
    0x0186: 'CORE Lighting Ltd',
    0x0187: 'Seraphim Sense Ltd',
    0x0188: 'Unico RBC ',
    0x0189: 'Physical Enterprises Inc.',
    0x018a: 'Able Trend Technology Limited',
    0x018b: 'Konica Minolta, Inc.',
    0x018c: 'Wilo SE',
    0x018d: 'Extron Design Services',
    0x018e: 'Fitbit, Inc.',
    0x018f: 'Fireflies Systems',
    0x0190: 'Intelletto Technologies Inc.',
    0x0191: 'FDK CORPORATION ',
    0x0192: 'Cloudleaf, Inc',
    0x0193: 'Maveric Automation LLC',
    0x0194: 'Acoustic Stream Corporation',
    0x0195: 'Zuli',
    0x0196: 'Paxton Access Ltd',
    0x0197: 'WiSilica Inc.',
    0x0198: 'VENGIT Korlatolt Felelossegu Tarsasag',
    0x0199: 'SALTO SYSTEMS S.L.',
    0x019a: 'TRON Forum (formerly T-Engine Forum)',
    0x019b: 'CUBETECH s.r.o.',
    0x019c: 'Cokiya Incorporated',
    0x019d: 'CVS Health',
    0x019e: 'Ceruus',
    0x019f: 'Strainstall Ltd',
    0x01a0: 'Channel Enterprises (HK) Ltd.',
    0x01a1: 'FIAMM',
    0x01a2: 'GIGALANE.CO.,LTD',
    0x01a3: 'EROAD',
    0x01a4: 'Mine Safety Appliances',
    0x01a5: 'Icon Health and Fitness',
    0x01a6: 'Asandoo GmbH',
    0x01a7: 'ENERGOUS CORPORATION',
    0x01a8: 'Taobao',
    0x01a9: 'Canon Inc.',
    0x01aa: 'Geophysical Technology Inc.',
    0x01ab: 'Facebook, Inc.',
    0x01ac: 'Trividia Health, Inc.',
    0x01ad: 'FlightSafety International',
    0x01ae: 'Earlens Corporation',
    0x01af: 'Sunrise Micro Devices, Inc.',
    0x01b0: 'Star Micronics Co., Ltd.',
    0x01b1: 'Netizens Sp. z o.o.',
    0x01b2: 'Nymi Inc.',
    0x01b3: 'Nytec, Inc.',
    0x01b4: 'Trineo Sp. z o.o.',
    0x01b5: 'Nest Labs Inc.',
    0x01b6: 'LM Technologies Ltd',
    0x01b7: 'General Electric Company',
    0x01b8: 'i+D3 S.L.',
    0x01b9: 'HANA Micron',
    0x01ba: 'Stages Cycling LLC',
    0x01bb: 'Cochlear Bone Anchored Solutions AB',
    0x01bc: 'SenionLab AB',
    0x01bd: 'Syszone Co., Ltd',
    0x01be: 'Pulsate Mobile Ltd.',
    0x01bf: 'Hong Kong HunterSun Electronic Limited',
    0x01c0: 'pironex GmbH',
    0x01c1: 'BRADATECH Corp.',
    0x01c2: 'Transenergooil AG',
    0x01c3: 'Bunch',
    0x01c4: 'DME Microelectronics',
    0x01c5: 'Bitcraze AB',
    0x01c6: 'HASWARE Inc.',
    0x01c7: 'Abiogenix Inc.',
    0x01c8: 'Poly-Control ApS',
    0x01c9: 'Avi-on',
    0x01ca: 'Laerdal Medical AS',
    0x01cb: 'Fetch My Pet',
    0x01cc: 'Sam Labs Ltd.',
    0x01cd: 'Chengdu Synwing Technology Ltd',
    0x01ce: 'HOUWA SYSTEM DESIGN, k.k.',
    0x01cf: 'BSH',
    0x01d0: 'Primus Inter Pares Ltd',
    0x01d1: 'August Home, Inc',
    0x01d2: 'Gill Electronics',
    0x01d3: 'Sky Wave Design',
    0x01d4: 'Newlab S.r.l.',
    0x01d5: 'ELAD srl',
    0x01d6: 'G-wearables inc.',
    0x01d7: 'Squadrone Systems Inc.',
    0x01d8: 'Code Corporation',
    0x01d9: 'Savant Systems LLC',
    0x01da: 'Logitech International SA',
    0x01db: 'Innblue Consulting',
    0x01dc: 'iParking Ltd.',
    0x01dd: 'Koninklijke Philips Electronics N.V.',
    0x01de: 'Minelab Electronics Pty Limited',
    0x01df: 'Bison Group Ltd.',
    0x01e0: 'Widex A/S',
    0x01e1: 'Jolla Ltd',
    0x01e2: 'Lectronix, Inc.',
    0x01e3: 'Caterpillar Inc',
    0x01e4: 'Freedom Innovations',
    0x01e5: 'Dynamic Devices Ltd',
    0x01e6: 'Technology Solutions (UK) Ltd',
    0x01e7: 'IPS Group Inc.',
    0x01e8: 'STIR',
    0x01e9: 'Sano, Inc.',
    0x01ea: 'Advanced Application Design, Inc.',
    0x01eb: 'AutoMap LLC',
    0x01ec: 'Spreadtrum Communications Shanghai Ltd',
    0x01ed: 'CuteCircuit LTD',
    0x01ee: 'Valeo Service',
    0x01ef: 'Fullpower Technologies, Inc. ',
    0x01f0: 'KloudNation',
    0x01f1: 'Zebra Technologies Corporation',
    0x01f2: 'Itron, Inc. ',
    0x01f3: 'The University of Tokyo',
    0x01f4: 'UTC Fire and Security',
    0x01f5: 'Cool Webthings Limited',
    0x01f6: 'DJO Global',
    0x01f7: 'Gelliner Limited',
    0x01f8: 'Anyka (Guangzhou) Microelectronics Technology Co, LTD ',
    0x01f9: 'Medtronic Inc.',
    0x01fa: 'Gozio Inc.',
    0x01fb: 'Form Lifting, LLC',
    0x01fc: 'Wahoo Fitness, LLC',
    0x01fd: 'Kontakt Micro-Location Sp. z o.o. ',
    0x01fe: 'Radio Systems Corporation',
    0x01ff: 'Freescale Semiconductor, Inc.',
    0x0200: 'Verifone Systems Pte Ltd. Taiwan Branch',
    0x0201: 'AR Timing',
    0x0202: 'Rigado LLC',
    0x0203: 'Kemppi Oy',
    0x0204: 'Tapcentive Inc.',
    0x0205: 'Smartbotics Inc.',
    0x0206: 'Otter Products, LLC',
    0x0207: 'STEMP Inc.',
    0x0208: 'LumiGeek LLC',
    0x0209: 'InvisionHeart Inc.',
    0x020a: 'Macnica Inc. ',
    0x020b: 'Jaguar Land Rover Limited',
    0x020c: 'CoroWare Technologies, Inc',
    0x020d: 'Simplo Technology Co., LTD',
    0x020e: 'Omron Healthcare Co., LTD',
    0x020f: 'Comodule GMBH',
    0x0210: 'ikeGPS',
    0x0211: 'Telink Semiconductor Co. Ltd',
    0x0212: 'Interplan Co., Ltd',
    0x0213: 'Wyler AG',
    0x0214: 'IK Multimedia Production srl',
    0x0215: 'Lukoton Experience Oy',
    0x0216: 'MTI Ltd',
    0x0217: 'Tech4home, Lda',
    0x0218: 'Hiotech AB',
    0x0219: 'DOTT Limited',
    0x021a: 'Blue Speck Labs, LLC',
    0x021b: 'Cisco Systems, Inc',
    0x021c: 'Mobicomm Inc',
    0x021d: 'Edamic',
    0x021e: 'Goodnet, Ltd',
    0x021f: 'Luster Leaf Products  Inc',
    0x0220: 'Manus Machina BV',
    0x0221: 'Mobiquity Networks Inc',
    0x0222: 'Praxis Dynamics',
    0x0223: 'Philip Morris Products S.A.',
    0x0224: 'Comarch SA',
    0x0225: 'Nestl Nespresso S.A.',
    0x0226: 'Merlinia A/S',
    0x0227: 'LifeBEAM Technologies',
    0x0228: 'Twocanoes Labs, LLC',
    0x0229: 'Muoverti Limited',
    0x022a: 'Stamer Musikanlagen GMBH',
    0x022b: 'Tesla Motors',
    0x022c: 'Pharynks Corporation',
    0x022d: 'Lupine',
    0x022e: 'Siemens AG',
    0x022f: 'Huami (Shanghai) Culture Communication CO., LTD',
    0x0230: 'Foster Electric Company, Ltd',
    0x0231: 'ETA SA',
    0x0232: 'x-Senso Solutions Kft',
    0x0233: 'Shenzhen SuLong Communication Ltd',
    0x0234: 'FengFan (BeiJing) Technology Co, Ltd',
    0x0235: 'Qrio Inc',
    0x0236: 'Pitpatpet Ltd',
    0x0237: 'MSHeli s.r.l.',
    0x0238: 'Trakm8 Ltd',
    0x0239: 'JIN CO, Ltd ',
    0x023a: 'Alatech Tehnology',
    0x023b: 'Beijing CarePulse Electronic Technology Co, Ltd',
    0x023c: 'Awarepoint',
    0x023d: 'ViCentra B.V.',
    0x023e: 'Raven Industries',
    0x023f: 'WaveWare Technologies Inc.',
    0x0240: 'Argenox Technologies',
    0x0241: 'Bragi GmbH',
    0x0242: '16Lab Inc',
    0x0243: 'Masimo Corp',
    0x0244: 'Iotera Inc',
    0x0245: 'Endress+Hauser',
    0x0246: 'ACKme Networks, Inc.',
    0x0247: 'FiftyThree Inc.',
    0x0248: 'Parker Hannifin Corp',
    0x0249: 'Transcranial Ltd',
    0x024a: 'Uwatec AG',
    0x024b: 'Orlan LLC',
    0x024c: 'Blue Clover Devices',
    0x024d: 'M-Way Solutions GmbH',
    0x024e: 'Microtronics Engineering GmbH',
    0x024f: 'Schneider Schreibgerte GmbH',
    0x0250: 'Sapphire Circuits LLC',
    0x0251: 'Lumo Bodytech Inc.',
    0x0252: 'UKC Technosolution',
    0x0253: 'Xicato Inc.',
    0x0254: 'Playbrush',
    0x0255: 'Dai Nippon Printing Co., Ltd.',
    0x0256: 'G24 Power Limited',
    0x0257: 'AdBabble Local Commerce Inc.',
    0x0258: 'Devialet SA',
    0x0259: 'ALTYOR',
    0x025a: 'University of Applied Sciences Valais/Haute Ecole Valaisanne',
    0x025b: 'Five Interactive, LLC dba Zendo',
    0x025c: 'NetEaseHangzhouNetwork co.Ltd.',
    0x025d: 'Lexmark International Inc.',
    0x025e: 'Fluke Corporation',
    0x025f: 'Yardarm Technologies',
    0x0260: 'SensaRx',
    0x0261: 'SECVRE GmbH',
    0x0262: 'Glacial Ridge Technologies',
    0x0263: 'Identiv, Inc.',
    0x0264: 'DDS, Inc.',
    0x0265: 'SMK Corporation',
    0x0266: 'Schawbel Technologies LLC',
    0x0267: 'XMI Systems SA',
    0x0268: 'Cerevo',
    0x0269: 'Torrox GmbH &amp; Co KG',
    0x026a: 'Gemalto',
    0x026b: 'DEKA Research &amp; Development Corp.',
    0x026c: 'Domster Tadeusz Szydlowski',
    0x026d: 'Technogym SPA',
    0x026e: 'FLEURBAEY BVBA',
    0x026f: 'Aptcode Solutions',
    0x0270: 'LSI ADL Technology',
    0x0271: 'Animas Corp',
    0x0272: 'Alps Electric Co., Ltd.',
    0x0273: 'OCEASOFT',
    0x0274: 'Motsai Research',
    0x0275: 'Geotab',
    0x0276: 'E.G.O. Elektro-Gertebau GmbH',
    0x0277: 'bewhere inc',
    0x0278: 'Johnson Outdoors Inc',
    0x0279: 'steute Schaltgerate GmbH &amp; Co. KG',
    0x027a: 'Ekomini inc.',
    0x027b: 'DEFA AS',
    0x027c: 'Aseptika Ltd',
    0x027d: 'HUAWEI Technologies Co., Ltd. (  )',
    0x027e: 'HabitAware, LLC',
    0x027f: 'ruwido austria gmbh',
    0x0280: 'ITEC corporation',
    0x0281: 'StoneL',
    0x0282: 'Sonova AG',
    0x0283: 'Maven Machines, Inc.',
    0x0284: 'Synapse Electronics',
    0x0285: 'Standard Innovation Inc.',
    0x0286: 'RF Code, Inc.',
    0x0287: 'Wally Ventures S.L.',
    0x0288: 'Willowbank Electronics Ltd',
    0x0289: 'SK Telecom',
    0x028a: 'Jetro AS',
    0x028b: 'Code Gears LTD',
    0x028c: 'NANOLINK APS',
    0x028d: 'IF, LLC',
    0x028e: 'RF Digital Corp',
    0x028f: 'Church &amp; Dwight Co., Inc',
    0x0290: 'Multibit Oy',
    0x0291: 'CliniCloud Inc',
    0x0292: 'SwiftSensors',
    0x0293: 'Blue Bite',
    0x0294: 'ELIAS GmbH',
    0x0295: 'Sivantos GmbH',
    0x0296: 'Petzl',
    0x0297: 'storm power ltd',
    0x0298: 'EISST Ltd',
    0x0299: 'Inexess Technology Simma KG',
    0x029a: 'Currant, Inc.',
    0x029b: 'C2 Development, Inc.',
    0x029c: 'Blue Sky Scientific, LLC',
    0x029d: 'ALOTTAZS LABS, LLC',
    0x029e: 'Kupson spol. s r.o.',
    0x029f: 'Areus Engineering GmbH',
    0x02a0: 'Impossible Camera GmbH',
    0x02a1: 'InventureTrack Systems',
    0x02a2: 'LockedUp',
    0x02a3: 'Itude',
    0x02a4: 'Pacific Lock Company',
    0x02a5: 'Tendyron Corporation (  )',
    0x02a6: 'Robert Bosch GmbH',
    0x02a7: 'Illuxtron international B.V.',
    0x02a8: 'miSport Ltd.',
    0x02a9: 'Chargelib',
    0x02aa: 'Doppler Lab',
    0x02ab: 'BBPOS Limited',
    0x02ac: 'RTB Elektronik GmbH &amp; Co. KG',
    0x02ad: 'Rx Networks, Inc.',
    0x02ae: 'WeatherFlow, Inc.',
    0x02af: 'Technicolor USA Inc.',
    0x02b0: 'Bestechnic(Shanghai),Ltd',
    0x02b1: 'Raden Inc',
    0x02b2: 'JouZen Oy',
    0x02b3: 'CLABER S.P.A.',
    0x02b4: 'Hyginex, Inc.',
    0x02b5: 'HANSHIN ELECTRIC RAILWAY CO.,LTD.',
    0x02b6: 'Schneider Electric',
    0x02b7: 'Oort Technologies LLC',
    0x02b8: 'Chrono Therapeutics',
    0x02b9: 'Rinnai Corporation',
    0x02ba: 'Swissprime Technologies AG',
    0x02bb: 'Koha.,Co.Ltd',
    0x02bc: 'Genevac Ltd',
    0x02bd: 'Chemtronics',
    0x02be: 'Seguro Technology Sp. z o.o.',
    0x02bf: 'Redbird Flight Simulations',
    0x02c0: 'Dash Robotics',
    0x02c1: 'LINE Corporation',
    0x02c2: 'Guillemot Corporation',
    0x02c3: 'Techtronic Power Tools Technology Limited',
    0x02c4: 'Wilson Sporting Goods',
    0x02c5: 'Lenovo (Singapore) Pte Ltd. (  )',
    0x02c6: 'Ayatan Sensors',
    0x02c7: 'Electronics Tomorrow Limited',
    0x02c8: 'VASCO Data Security International, Inc.',
    0x02c9: 'PayRange Inc.',
    0x02ca: 'ABOV Semiconductor',
    0x02cb: 'AINA-Wireless Inc.',
    0x02cc: 'Eijkelkamp Soil &amp; Water',
    0x02cd: 'BMA ergonomics b.v.',
    0x02ce: 'Teva Branded Pharmaceutical Products R&amp;D, Inc.',
    0x02cf: 'Anima',
    0x02d0: '3M',
    0x02d1: 'Empatica Srl',
    0x02d2: 'Afero, Inc.',
    0x02d3: 'Powercast Corporation',
    0x02d4: 'Secuyou ApS',
    0x02d5: 'OMRON Corporation',
    0x02d6: 'Send Solutions',
    0x02d7: 'NIPPON SYSTEMWARE CO.,LTD.',
    0x02d8: 'Neosfar',
    0x02d9: 'Fliegl Agrartechnik GmbH',
    0x02da: 'Gilvader',
    0x02db: 'Digi International Inc (R)',
    0x02dc: 'DeWalch Technologies, Inc.',
    0x02dd: 'Flint Rehabilitation Devices, LLC',
    0x02de: 'Samsung SDS Co., Ltd.',
    0x02df: 'Blur Product Development',
    0x02e0: 'University of Michigan',
    0x02e1: 'Victron Energy BV',
    0x02e2: 'NTT docomo',
    0x02e3: 'Carmanah Technologies Corp.',
    0x02e4: 'Bytestorm Ltd.',
    0x02e5: 'Espressif Incorporated ( () )',
    0x02e6: 'Unwire',
    0x02e7: 'Connected Yard, Inc.',
    0x02e8: 'American Music Environments',
    0x02e9: 'Sensogram Technologies, Inc.',
    0x02ea: 'Fujitsu Limited',
    0x02eb: 'Ardic Technology',
    0x02ec: 'Delta Systems, Inc',
    0x02ed: 'HTC Corporation',
    0x02ee: 'Citizen Holdings Co., Ltd.',
    0x02ef: 'SMART-INNOVATION.inc',
    0x02f0: 'Blackrat Software',
    0x02f1: 'The Idea Cave, LLC',
    0x02f2: 'GoPro, Inc.',
    0x02f3: 'AuthAir, Inc',
    0x02f4: 'Vensi, Inc.',
    0x02f5: 'Indagem Tech LLC',
    0x02f6: 'Intemo Technologies',
    0x02f7: 'DreamVisions co., Ltd.',
    0x02f8: 'Runteq Oy Ltd',
    0x02f9: 'IMAGINATION TECHNOLOGIES LTD',
    0x02fa: 'CoSTAR TEchnologies',
    0x02fb: 'Clarius Mobile Health Corp.',
    0x02fc: 'Shanghai Frequen Microelectronics Co., Ltd.',
    0x02fd: 'Uwanna, Inc.',
    0x02fe: 'Lierda Science &amp; Technology Group Co., Ltd.',
    0x02ff: 'Silicon Laboratories',
    0x0300: 'World Moto Inc.',
    0x0301: 'Giatec Scientific Inc.',
    0x0302: 'Loop Devices, Inc',
    0x0303: 'IACA electronique',
    0x0304: 'Proxy Technologies, Inc.',
    0x0305: 'Swipp ApS',
    0x0306: 'Life Laboratory Inc.',
    0x0307: 'FUJI INDUSTRIAL CO.,LTD. ',
    0x0308: 'Surefire, LLC',
    0x0309: 'Dolby Labs',
    0x030a: 'Ellisys',
    0x030b: 'Magnitude Lighting Converters',
    0x030c: 'Hilti AG',
    0x030d: 'Devdata S.r.l.',
    0x030e: 'Deviceworx',
    0x030f: 'Shortcut Labs',
    0x0310: 'SGL Italia S.r.l.',
    0x0311: 'PEEQ DATA',
    0x0312: 'Ducere Technologies Pvt Ltd',
    0x0313: 'DiveNav, Inc.',
    0x0314: 'RIIG AI Sp. z o.o.',
    0x0315: 'Thermo Fisher Scientific',
    0x0316: 'AG Measurematics Pvt. Ltd.',
    0x0317: 'CHUO Electronics CO., LTD.',
    0x0318: 'Aspenta International',
    0x0319: 'Eugster Frismag AG',
    0x031a: 'Amber wireless GmbH',
    0x031b: 'HQ Inc',
    0x031c: 'Lab Sensor Solutions',
    0x031d: 'Enterlab ApS',
    0x031e: 'Eyefi, Inc.',
    0x031f: 'MetaSystem S.p.A.',
    0x0320: 'SONO ELECTRONICS. CO., LTD',
    0x0321: 'Jewelbots',
    0x0322: 'Compumedics Limited',
    0x0323: 'Rotor Bike Components',
    0x0324: 'Astro, Inc.',
    0x0325: 'Amotus Solutions',
    0x0326: 'Healthwear Technologies (Changzhou)Ltd',
    0x0327: 'Essex Electronics',
    0x0328: 'Grundfos A/S',
    0x0329: 'Eargo, Inc.',
    0x032a: 'Electronic Design Lab',
    0x032b: 'ESYLUX',
    0x032c: 'NIPPON SMT.CO.,Ltd',
    0x032d: 'BM innovations GmbH',
    0x032e: 'indoormap',
    0x032f: 'OttoQ Inc',
    0x0330: 'North Pole Engineering',
    0x0331: '3flares Technologies Inc.',
    0x0332: 'Electrocompaniet A.S.',
    0x0333: 'Mul-T-Lock',
    0x0334: 'Corentium AS',
    0x0335: 'Enlighted Inc',
    0x0336: 'GISTIC',
    0x0337: 'AJP2 Holdings, LLC',
    0x0338: 'COBI GmbH',
    0x0339: 'Blue Sky Scientific, LLC',
    0x033a: 'Appception, Inc.',
    0x033b: 'Courtney Thorne Limited',
    0x033c: 'Virtuosys',
    0x033d: 'TPV Technology Limited',
    0x033e: 'Monitra SA',
    0x033f: 'Automation Components, Inc.',
    0x0340: 'Letsense s.r.l.',
    0x0341: 'Etesian Technologies LLC',
    0x0342: 'GERTEC BRASIL LTDA.',
    0x0343: 'Drekker Development Pty. Ltd.',
    0x0344: 'Whirl Inc',
    0x0345: 'Locus Positioning',
    0x0346: 'Acuity Brands Lighting, Inc',
    0x0347: 'Prevent Biometrics',
    0x0348: 'Arioneo',
    0x0349: 'VersaMe',
    0x034a: 'Vaddio',
    0x034b: 'Libratone A/S',
    0x034c: 'HM Electronics, Inc.',
    0x034d: 'TASER International, Inc.',
    0x034e: 'SafeTrust Inc.',
    0x034f: 'Heartland Payment Systems',
    0x0350: 'Bitstrata Systems Inc.',
    0x0351: 'Pieps GmbH',
    0x0352: 'iRiding(Xiamen)Technology Co.,Ltd.',
    0x0353: 'Alpha Audiotronics, Inc.',
    0x0354: 'TOPPAN FORMS CO.,LTD.',
    0x0355: 'Sigma Designs, Inc.',
    0x0356: 'Spectrum Brands, Inc.',
    0x0357: 'Polymap Wireless',
    0x0358: 'MagniWare Ltd. ',
    0x0359: 'Novotec Medical GmbH',
    0x035a: 'Medicom Innovation Partner a/s',
    0x035b: 'Matrix Inc.',
    0x035c: 'Eaton Corporation',
    0x035d: 'KYS',
    0x035e: 'Naya Health, Inc.',
    0x035f: 'Acromag',
    0x0360: 'Insulet Corporation',
    0x0361: 'Wellinks Inc.',
    0x0362: 'ON Semiconductor',
    0x0363: 'FREELAP SA',
    0x0364: 'Favero Electronics Srl',
    0x0365: 'BioMech Sensor LLC',
    0x0366: 'BOLTT Sports technologies Private limited',
    0x0367: 'Saphe International',
    0x0368: 'Metormote AB',
    0x0369: 'littleBits',
    0x036a: 'SetPoint Medical',
    0x036b: 'BRControls Products BV',
    0x036c: 'Zipcar',
    0x036d: 'AirBolt Pty Ltd',
    0x036e: 'KeepTruckin Inc',
    0x036f: 'Motiv, Inc.',
    0x0370: 'Wazombi Labs O',
    0x0371: 'ORBCOMM',
    0x0372: 'Nixie Labs, Inc.',
    0x0373: 'AppNearMe Ltd',
    0x0374: 'Holman Industries',
    0x0375: 'Expain AS',
    0x0376: 'Electronic Temperature Instruments Ltd',
    0x0377: 'Plejd AB',
    0x0378: 'Propeller Health',
    0x0379: 'Shenzhen iMCO Electronic Technology Co.,Ltd',
    0x037a: 'Algoria',
    0x037b: 'Apption Labs Inc.',
    0x037c: 'Cronologics Corporation',
    0x037d: 'MICRODIA Ltd.',
    0x037e: 'lulabytes S.L.',
    0x037f: 'Nestec S.A.',
    0x0380: 'LLC &quot;MEGA-F service&quot;',
    0x0381: 'Sharp Corporation',
    0x0382: 'Precision Outcomes Ltd',
    0x0383: 'Kronos Incorporated',
    0x0384: 'OCOSMOS Co., Ltd.',
    0x0385: 'Embedded Electronic Solutions Ltd. dba e2Solutions',
    0x0386: 'Aterica Inc.',
    0x0387: 'BluStor PMC, Inc.',
    0x0388: 'Kapsch TrafficCom AB',
    0x0389: 'ActiveBlu Corporation',
    0x038a: 'Kohler Mira Limited',
    0x038b: 'Noke',
    0x038c: 'Appion Inc.',
    0x038d: 'Resmed Ltd',
    0x038e: 'Crownstone B.V.',
    0x038f: 'Xiaomi Inc.',
    0x0390: 'INFOTECH s.r.o.',
    0x0391: 'Thingsquare AB',
    0x0392: 'T&amp;D',
    0x0393: 'LAVAZZA S.p.A.',
    0x0394: 'Netclearance Systems, Inc.',
    0x0395: 'SDATAWAY',
    0x0396: 'BLOKS GmbH',
    0x0397: 'LEGO System A/S',
    0x0398: 'Thetatronics Ltd',
    0x0399: 'Nikon Corporation',
    0x039a: 'NeST',
    0x039b: 'South Silicon Valley Microelectronics',
    0x039c: 'ALE International',
    0x039d: 'CareView Communications, Inc.',
    0x039e: 'SchoolBoard Limited',
    0x039f: 'Molex Corporation',
    0x03a0: 'IVT Wireless Limited',
    0x03a1: 'Alpine Labs LLC',
    0x03a2: 'Candura Instruments',
    0x03a3: 'SmartMovt Technology Co., Ltd',
    0x03a4: 'Token Zero Ltd',
    0x03a5: 'ACE CAD Enterprise Co., Ltd. (ACECAD)',
    0x03a6: 'Medela, Inc',
    0x03a7: 'AeroScout',
    0x03a8: 'Esrille Inc.',
    0x03a9: 'THINKERLY SRL',
    0x03aa: 'Exon Sp. z o.o.',
    0x03ab: 'Meizu Technology Co., Ltd.',
    0x03ac: 'Smablo LTD',
    0x03ad: 'XiQ',
    0x03ae: 'Allswell Inc.',
    0x03af: 'Comm-N-Sense Corp DBA Verigo',
    0x03b0: 'VIBRADORM GmbH',
    0x03b1: 'Otodata Wireless Network Inc.',
    0x03b2: 'Propagation Systems Limited',
    0x03b3: 'Midwest Instruments &amp; Controls',
    0x03b4: 'Alpha Nodus, inc.',
    0x03b5: 'petPOMM, Inc',
    0x03b6: 'Mattel',
    0x03b7: 'Airbly Inc.',
    0x03b8: 'A-Safe Limited',
    0x03b9: 'FREDERIQUE CONSTANT SA',
    0x03ba: 'Maxscend Microelectronics Company Limited',
    0x03bb: 'Abbott Diabetes Care',
    0x03bc: 'ASB Bank Ltd',
    0x03bd: 'amadas',
    0x03be: 'Applied Science, Inc.',
    0x03bf: 'iLumi Solutions Inc.',
    0x03c0: 'Arch Systems Inc.',
    0x03c1: 'Ember Technologies, Inc.',
    0x03c2: 'Snapchat Inc',
    0x03c3: 'Casambi Technologies Oy',
    0x03c4: 'Pico Technology Inc.',
    0x03c5: 'St. Jude Medical, Inc.',
    0x03c6: 'Intricon',
    0x03c7: 'Structural Health Systems, Inc.',
    0x03c8: 'Avvel International',
    0x03c9: 'Gallagher Group',
    0x03ca: 'In2things Automation Pvt. Ltd.',
    0x03cb: 'SYSDEV Srl',
    0x03cc: 'Vonkil Technologies Ltd',
    0x03cd: 'Wynd Technologies, Inc.',
    0x03ce: 'CONTRINEX S.A.',
    0x03cf: 'MIRA, Inc.',
    0x03d0: 'Watteam Ltd',
    0x03d1: 'Density Inc.',
    0x03d2: 'IOT Pot India Private Limited',
    0x03d3: 'Sigma Connectivity AB',
    0x03d4: 'PEG PEREGO SPA',
    0x03d5: 'Wyzelink Systems Inc.',
    0x03d6: 'Yota Devices LTD',
    0x03d7: 'FINSECUR',
    0x03d8: 'Zen-Me Labs Ltd',
    0x03d9: '3IWare Co., Ltd.',
    0x03da: 'EnOcean GmbH',
    0x03db: 'Instabeat, Inc',
    0x03dc: 'Nima Labs',
    0x03dd: 'Andreas Stihl AG &amp; Co. KG',
    0x03de: 'Nathan Rhoades LLC',
    0x03df: 'Grob Technologies, LLC',
    0x03e0: 'Actions (Zhuhai) Technology Co., Limited',
    0x03e1: 'SPD Development Company Ltd',
    0x03e2: 'Sensoan Oy',
    0x03e3: 'Qualcomm Life Inc',
    0x03e4: 'Chip-ing AG',
    0x03e5: 'ffly4u',
    0x03e6: 'IoT Instruments Oy',
    0x03e7: 'TRUE Fitness Technology',
    0x03e8: 'Reiner Kartengeraete GmbH &amp; Co. KG.',
    0x03e9: 'SHENZHEN LEMONJOY TECHNOLOGY CO., LTD.',
    0x03ea: 'Hello Inc.',
    0x03eb: 'Evollve Inc.',
    0x03ec: 'Jigowatts Inc.',
    0x03ed: 'BASIC MICRO.COM,INC.',
    0x03ee: 'CUBE TECHNOLOGIES',
    0x03ef: 'foolography GmbH',
    0x03f0: 'CLINK',
    0x03f1: 'Hestan Smart Cooking Inc.',
    0x03f2: 'WindowMaster A/S',
    0x03f3: 'Flowscape AB',
    0x03f4: 'PAL Technologies Ltd',
    0x03f5: 'WHERE, Inc.',
    0x03f6: 'Iton Technology Corp.',
    0x03f7: 'Owl Labs Inc.',
    0x03f8: 'Rockford Corp.',
    0x03f9: 'Becon Technologies Co.,Ltd.',
    0x03fa: 'Vyassoft Technologies Inc',
    0x03fb: 'Nox Medical',
    0x03fc: 'Kimberly-Clark',
    0x03fd: 'Trimble Navigation Ltd.',
    0x03fe: 'Littelfuse',
    0x03ff: 'Withings',
    0x0400: 'i-developer IT Beratung UG',
    0x0401: '',
    0x0402: 'Sears Holdings Corporation',
    0x0403: 'Gantner Electronic GmbH',
    0x0404: 'Authomate Inc',
    0x0405: 'Vertex International, Inc.',
    0x0406: 'Airtago',
    0x0407: 'Swiss Audio SA',
    0x0408: 'ToGetHome Inc.',
    0x0409: 'AXIS',
    0x040a: 'Openmatics',
    0x040b: 'Jana Care Inc.',
    0x040c: 'Senix Corporation',
    0x040d: 'NorthStar Battery Company, LLC',
    0x040e: 'SKF (U.K.) Limited',
    0x040f: 'CO-AX Technology, Inc.',
    0x0410: 'Fender Musical Instruments',
    0x0411: 'Luidia Inc',
    0x0412: 'SEFAM',
    0x0413: 'Wireless Cables Inc',
    0x0414: 'Lightning Protection International Pty Ltd',
    0x0415: 'Uber Technologies Inc',
    0x0416: 'SODA GmbH',
    0x0417: 'Fatigue Science',
    0x0418: 'Alpine Electronics Inc.',
    0x0419: 'Novalogy LTD',
    0x041a: 'Friday Labs Limited',
    0x041b: 'OrthoAccel Technologies',
    0x041c: 'WaterGuru, Inc.',
    0x041d: 'Benning Elektrotechnik und Elektronik GmbH &amp; Co. KG',
    0x041e: 'Dell Computer Corporation',
    0x041f: 'Kopin Corporation',
    0x0420: 'TecBakery GmbH',
    0x0421: 'Backbone Labs, Inc.',
    0x0422: 'DELSEY SA',
    0x0423: 'Chargifi Limited',
    0x0424: 'Trainesense Ltd.',
    0x0425: 'Unify Software and Solutions GmbH &amp; Co. KG',
    0x0426: 'Husqvarna AB',
    0x0427: 'Focus fleet and fuel management inc',
    0x0428: 'SmallLoop, LLC',
    0x0429: 'Prolon Inc.',
    0x042a: 'BD Medical',
    0x042b: 'iMicroMed Incorporated',
    0x042c: 'Ticto N.V.',
    0x042d: 'Meshtech AS',
    0x042e: 'MemCachier Inc.',
    0x042f: 'Danfoss A/S',
    0x0430: 'SnapStyk Inc.',
    0x0431: 'Amway Corporation',
    0x0432: 'Silk Labs, Inc.',
    0x0433: 'Pillsy Inc.',
    0x0434: 'Hatch Baby, Inc.',
    0x0435: 'Blocks Wearables Ltd.',
    0x0436: 'Drayson Technologies (Europe) Limited',
    0x0437: 'eBest IOT Inc.',
    0x0438: 'Helvar Ltd',
    0x0439: 'Radiance Technologies',
    0x043a: 'Nuheara Limited',
    0x043b: 'Appside co., ltd.',
    0x043c: 'DeLaval',
    0x043d: 'Coiler Corporation',
    0x043e: 'Thermomedics, Inc.',
    0x043f: 'Tentacle Sync GmbH',
    0x0440: 'Valencell, Inc.',
    0x0441: 'iProtoXi Oy',
    0x0442: 'SECOM CO., LTD.',
    0x0443: 'Tucker International LLC',
    0x0444: 'Metanate Limited',
    0x0445: 'Kobian Canada Inc.',
    0x0446: 'NETGEAR, Inc.',
    0x0447: 'Fabtronics Australia Pty Ltd',
    0x0448: 'Grand Centrix GmbH',
    0x0449: '1UP USA.com llc',
    0x044a: 'SHIMANO INC.',
    0x044b: 'Nain Inc.',
    0x044c: 'LifeStyle Lock, LLC',
    0x044d: 'VEGA Grieshaber KG',
    0x044e: 'Xtrava Inc.',
    0x044f: 'TTS Tooltechnic Systems AG &amp; Co. KG',
    0x0450: 'Teenage Engineering AB',
    0x0451: 'Tunstall Nordic AB',
    0x0452: 'Svep Design Center AB',
    0x0453: 'GreenPeak Technologies BV',
    0x0454: 'Sphinx Electronics GmbH &amp; Co KG',
    0x0455: 'Atomation',
    0x0456: 'Nemik Consulting Inc ',
    0x0457: 'RF INNOVATION',
    0x0458: 'Mini Solution Co., Ltd.',
    0x0459: 'Lumenetix, Inc',
    0x045a: '2048450 Ontario Inc',
    0x045b: 'SPACEEK LTD',
    0x045c: 'Delta T Corporation',
    0x045d: 'Boston Scientific Corporation',
    0x045e: 'Nuviz, Inc.',
    0x045f: 'Real Time Automation, Inc.',
    0x0460: 'Kolibree',
    0x0461: 'vhf elektronik GmbH',
    0x0462: 'Bonsai Systems GmbH',
    0x0463: 'Fathom Systems Inc.',
    0x0464: 'Bellman &amp; Symfon',
    0x0465: 'International Forte Group LLC',
    0x0466: 'CycleLabs Solutions inc.',
    0x0467: 'Codenex Oy',
    0x0468: 'Kynesim Ltd',
    0x0469: 'Palago AB',
    0x046a: 'INSIGMA INC.',
    0x046b: 'PMD Solutions',
    0x046c: 'Qingdao Realtime Technology Co., Ltd.',
    0x046d: 'BEGA Gantenbrink-Leuchten KG',
    0x046e: 'Pambor Ltd.',
    0x046f: 'Develco Products A/S',
    0x0470: 'iDesign s.r.l.',
    0x0471: 'TiVo Corp',
    0x0472: 'Control-J Pty Ltd',
    0x0473: 'Steelcase, Inc.',
    0x0474: 'iApartment co., ltd.',
    0x0475: 'Icom inc.',
    0x0476: 'Oxstren Wearable Technologies Private Limited',
    0x0477: 'Blue Spark Technologies',
    0x0478: 'FarSite Communications Limited',
    0x0479: 'mywerk system GmbH',
    0x047a: 'Sinosun Technology Co., Ltd.',
    0x047b: 'MIYOSHI ELECTRONICS CORPORATION',
    0x047c: 'POWERMAT LTD',
    0x047d: 'Occly LLC',
    0x047e: 'OurHub Dev IvS',
    0x047f: 'Pro-Mark, Inc.',
    0x0480: 'Dynometrics Inc.',
    0x0481: 'Quintrax Limited',
    0x0482: 'POS Tuning Udo Vosshenrich GmbH &amp; Co. KG',
    0x0483: 'Multi Care Systems B.V.',
    0x0484: 'Revol Technologies Inc',
    0x0485: 'SKIDATA AG',
    0x0486: 'DEV TECNOLOGIA INDUSTRIA, COMERCIO E MANUTENCAO DE EQUIPAMENTOS LTDA. - ME',
    0x0487: 'Centrica Connected Home',
    0x0488: 'Automotive Data Solutions Inc',
    0x0489: 'Igarashi Engineering',
    0x048a: 'Taelek Oy',
    0x048b: 'CP Electronics Limited',
    0x048c: 'Vectronix AG',
    0x048d: 'S-Labs Sp. z o.o.',
    0x048e: 'Companion Medical, Inc.',
    0x048f: 'BlueKitchen GmbH',
    0x0490: 'Matting AB',
    0x0491: 'SOREX - Wireless Solutions GmbH',
    0x0492: 'ADC Technology, Inc.',
    0x0493: 'Lynxemi Pte Ltd',
    0x0494: 'SENNHEISER electronic GmbH &amp; Co. KG',
    0x0495: 'LMT Mercer Group, Inc',
    0x0496: 'Polymorphic Labs LLC',
    0x0497: 'Cochlear Limited',
    0x0498: 'METER Group, Inc. USA',
    0x0499: 'Ruuvi Innovations Ltd.',
    0x049a: 'Situne AS',
    0x049b: 'nVisti, LLC',
    0x049c: 'DyOcean',
    0x049d: 'Uhlmann &amp; Zacher GmbH',
    0x049e: 'AND!XOR LLC',
    0x049f: 'tictote AB',
    0x04a0: 'Vypin, LLC',
    0x04a1: 'PNI Sensor Corporation',
    0x04a2: 'ovrEngineered, LLC',
    0x04a3: 'GT-tronics HK Ltd',
    0x04a4: 'Herbert Waldmann GmbH &amp; Co. KG',
    0x04a5: 'Guangzhou FiiO Electronics Technology Co.,Ltd',
    0x04a6: 'Vinetech Co., Ltd',
    0x04a7: 'Dallas Logic Corporation',
    0x04a8: 'BioTex, Inc.',
    0x04a9: 'DISCOVERY SOUND TECHNOLOGY, LLC',
    0x04aa: 'LINKIO SAS',
    0x04ab: 'Harbortronics, Inc.',
    0x04ac: 'Undagrid B.V.',
    0x04ad: 'Shure Inc',
    0x04ae: 'ERM Electronic Systems LTD',
    0x04af: 'BIOROWER Handelsagentur GmbH',
    0x04b0: 'Weba Sport und Med. Artikel GmbH',
    0x04b1: 'Kartographers Technologies Pvt. Ltd.',
    0x04b2: 'The Shadow on the Moon',
    0x04b3: 'mobike (Hong Kong) Limited',
    0x04b4: 'Inuheat Group AB',
    0x04b5: 'Swiftronix AB',
    0x04b6: 'Diagnoptics Technologies',
    0x04b7: 'Analog Devices, Inc.',
    0x04b8: 'Soraa Inc.',
    0x04b9: 'CSR Building Products Limited',
    0x04ba: 'Crestron Electronics, Inc.',
    0x04bb: 'Neatebox Ltd',
    0x04bc: 'Draegerwerk AG &amp; Co. KGaA',
    0x04bd: 'AlbynMedical',
    0x04be: 'Averos FZCO',
    0x04bf: 'VIT Initiative, LLC',
    0x04c0: 'Statsports International',
    0x04c1: 'Sospitas, s.r.o.',
    0x04c2: 'Dmet Products Corp.',
    0x04c3: 'Mantracourt Electronics Limited',
    0x04c4: 'TeAM Hutchins AB',
    0x04c5: 'Seibert Williams Glass, LLC',
    0x04c6: 'Insta GmbH',
    0x04c7: 'Svantek Sp. z o.o.',
    0x04c8: 'Shanghai Flyco Electrical Appliance Co., Ltd.',
    0x04c9: 'Thornwave Labs Inc',
    0x04ca: 'Steiner-Optik GmbH',
    0x04cb: 'Novo Nordisk A/S',
    0x04cc: 'Enflux Inc.',
    0x04cd: 'Safetech Products LLC',
    0x04ce: 'GOOOLED S.R.L.',
    0x04cf: 'DOM Sicherheitstechnik GmbH &amp; Co. KG',
    0x04d0: 'Olympus Corporation',
    0x04d1: 'KTS GmbH',
    0x04d2: 'Anloq Technologies Inc.',
    0x04d3: 'Queercon, Inc',
    0x04d4: '5th Element Ltd',
    0x04d5: 'Gooee Limited',
    0x04d6: 'LUGLOC LLC',
    0x04d7: 'Blincam, Inc.',
    0x04d8: 'FUJIFILM Corporation',
    0x04d9: 'RandMcNally',
    0x04da: 'Franceschi Marina snc',
    0x04db: 'Engineered Audio, LLC.',
    0x04dc: 'IOTTIVE (OPC) PRIVATE LIMITED',
    0x04dd: '4MOD Technology',
    0x04de: 'Lutron Electronics Co., Inc.',
    0x04df: 'Emerson',
    0x04e0: 'Guardtec, Inc.',
    0x04e1: 'REACTEC LIMITED',
    0x04e2: 'EllieGrid',
    0x04e3: 'Under Armour',
    0x04e4: 'Woodenshark',
    0x04e5: 'Avack Oy',
    0x04e6: 'Smart Solution Technology, Inc. ',
    0x04e7: 'REHABTRONICS INC. ',
    0x04e8: 'STABILO International',
    0x04e9: 'Busch Jaeger Elektro GmbH',
    0x04ea: 'Pacific Bioscience Laboratories, Inc',
    0x04eb: 'Bird Home Automation GmbH',
    0x04ec: 'Motorola Solutions',
    0x04ed: 'R9 Technology, Inc.',
    0x04ee: 'Auxivia',
    0x04ef: 'DaisyWorks, Inc',
    0x04f0: 'Kosi Limited',
    0x04f1: 'Theben AG',
    0x04f2: 'InDreamer Techsol Private Limited',
    0x04f3: 'Cerevast Medical',
    0x04f4: 'ZanCompute Inc.',
    0x04f5: 'Pirelli Tyre S.P.A.',
    0x04f6: 'McLear Limited',
    0x04f7: 'Shenzhen Huiding Technology Co.,Ltd.',
    0x04f8: 'Convergence Systems Limited',
    0x04f9: 'Interactio',
    0x04fa: 'Androtec GmbH',
    0x04fb: 'Benchmark Drives GmbH &amp; Co. KG',
    0x04fc: 'SwingLync L. L. C.',
    0x04fd: 'Tapkey GmbH',
    0x04fe: 'Woosim Systems Inc.',
    0x04ff: 'Microsemi Corporation',
    0x0500: 'Wiliot LTD.',
    0x0501: 'Polaris IND',
    0x0502: 'Specifi-Kali LLC',
    0x0503: 'Locoroll, Inc',
    0x0504: 'PHYPLUS Inc',
    0x0505: 'Inplay Technologies LLC',
    0x0506: 'Hager',
    0x0507: 'Yellowcog',
    0x0508: 'Axes System sp. z o. o.',
    0x0509: 'myLIFTER Inc.',
    0x050a: 'Shake-on B.V.',
    0x050b: 'Vibrissa Inc.',
    0x050c: 'OSRAM GmbH',
    0x050d: 'TRSystems GmbH',
    0x050e: 'Yichip Microelectronics (Hangzhou) Co.,Ltd.',
    0x050f: 'Foundation Engineering LLC',
    0x0510: 'UNI-ELECTRONICS, INC.',
    0x0511: 'Brookfield Equinox LLC',
    0x0512: 'Soprod SA',
    0x0513: '9974091 Canada Inc.',
    0x0514: 'FIBRO GmbH',
    0x0515: 'RB Controls Co., Ltd.',
    0x0516: 'Footmarks',
    0x0517: 'Amcore AB',
    0x0518: 'MAMORIO.inc',
    0x0519: 'Tyto Life LLC',
    0x051a: 'Leica Camera AG',
    0x051b: 'Angee Technologies Ltd.',
    0x051c: 'EDPS',
    0x051d: 'OFF Line Co., Ltd.',
    0x051e: 'Detect Blue Limited',
    0x051f: 'Setec Pty Ltd',
    0x0520: 'Target Corporation',
    0x0521: 'IAI Corporation',
    0x0522: 'NS Tech, Inc.',
    0x0523: 'MTG Co., Ltd.',
    0x0524: 'Hangzhou iMagic Technology Co., Ltd',
    0x0525: 'HONGKONG NANO IC TECHNOLOGIES  CO., LIMITED',
    0x0526: 'Honeywell International Inc.',
    0x0527: 'Albrecht JUNG',
    0x0528: 'Lunera Lighting Inc.',
    0x0529: 'Lumen UAB',
    0x052a: 'Keynes Controls Ltd',
    0x052b: 'Novartis AG',
    0x052c: 'Geosatis SA',
    0x052d: 'EXFO, Inc.',
    0x052e: 'LEDVANCE GmbH',
    0x052f: 'Center ID Corp.',
    0x0530: 'Adolene, Inc.',
    0x0531: 'D&amp;M Holdings Inc.',
    0x0532: 'CRESCO Wireless, Inc.',
    0x0533: 'Nura Operations Pty Ltd',
    0x0534: 'Frontiergadget, Inc.',
    0x0535: 'Smart Component Technologies Limited',
    0x0536: 'ZTR Control Systems LLC',
    0x0537: 'MetaLogics Corporation',
    0x0538: 'Medela AG',
    0x0539: 'OPPLE Lighting Co., Ltd',
    0x053a: 'Savitech Corp.,',
    0x053b: 'prodigy',
    0x053c: 'Screenovate Technologies Ltd',
    0x053d: 'TESA SA',
    0x053e: 'CLIM8 LIMITED',
    0x053f: 'Silergy Corp',
    0x0540: 'SilverPlus, Inc',
    0x0541: 'Sharknet srl',
    0x0542: 'Mist Systems, Inc.',
    0x0543: 'MIWA LOCK CO.,Ltd',
    0x0544: 'OrthoSensor, Inc.',
    0x0545: 'Candy Hoover Group s.r.l',
    0x0546: 'Apexar Technologies S.A.',
    0x0547: 'LOGICDATA d.o.o.',
    0x0548: 'Knick Elektronische Messgeraete GmbH &amp; Co. KG',
    0x0549: 'Smart Technologies and Investment Limited',
    0x054a: 'Linough Inc.',
    0x054b: 'Advanced Electronic Designs, Inc.',
    0x054c: 'Carefree Scott Fetzer Co Inc',
    0x054d: 'Sensome',
    0x054e: 'FORTRONIK storitve d.o.o.',
    0x054f: 'Sinnoz',
    0x0550: 'Versa Networks, Inc.',
    0x0551: 'Sylero',
    0x0552: 'Avempace SARL',
    0x0553: 'Nintendo Co., Ltd.',
    0x0554: 'National Instruments',
    0x0555: 'KROHNE Messtechnik GmbH',
    0x0556: 'Otodynamics Ltd',
    0x0557: 'Arwin Technology Limited',
    0x0558: 'benegear, inc.',
    0x0559: 'Newcon Optik',
    0x055a: 'CANDY HOUSE, Inc.',
    0x055b: 'FRANKLIN TECHNOLOGY INC',
    0x055c: 'Lely',
    0x055d: 'Valve Corporation',
    0x055e: 'Hekatron Vertriebs GmbH',
    0x055f: 'PROTECH S.A.S. DI GIRARDI ANDREA &amp; C.',
    0x0560: 'Sarita CareTech IVS',
    0x0561: 'Finder S.p.A.',
    0x0562: 'Thalmic Labs Inc.',
    0x0563: 'Steinel Vertrieb GmbH',
    0x0564: 'Beghelli Spa',
    0x0565: 'Beijing Smartspace Technologies Inc.',
    0x0566: 'CORE TRANSPORT TECHNOLOGIES NZ LIMITED',
    0x0567: 'Xiamen Everesports Goods Co., Ltd',
    0x0568: 'Bodyport Inc.',
    0x0569: 'Audionics System, INC.',
    0x056a: 'Flipnavi Co.,Ltd.',
    0x056b: 'Rion Co., Ltd.',
    0x056c: 'Long Range Systems, LLC',
    0x056d: 'Redmond Industrial Group LLC',
    0x056e: 'VIZPIN INC.',
    0x056f: 'BikeFinder AS',
    0x0570: 'Consumer Sleep Solutions LLC',
    0x0571: 'PSIKICK, INC.',
    0x0572: 'AntTail.com',
    0x0573: 'Lighting Science Group Corp.',
    0x0574: 'AFFORDABLE ELECTRONICS INC',
    0x0575: 'Integral Memroy Plc',
    0x0576: 'Globalstar, Inc.',
    0x0577: 'True Wearables, Inc.',
    0x0578: 'Wellington Drive Technologies Ltd',
    0x0579: 'Ensemble Tech Private Limited',
    0x057a: 'OMNI Remotes',
    0x057b: 'Duracell U.S. Operations Inc.',
    0x057c: 'Toor Technologies LLC',
    0x057d: 'Instinct Performance',
    0x057e: 'Beco, Inc',
    0x057f: 'Scuf Gaming International, LLC',
    0x0580: 'ARANZ Medical Limited',
    0x0581: 'LYS TECHNOLOGIES LTD',
    0x0582: 'Breakwall Analytics, LLC',
    0x0583: 'Code Blue Communications',
    0x0584: 'Gira Giersiepen GmbH &amp; Co. KG',
    0x0585: 'Hearing Lab Technology',
    0x0586: 'LEGRAND',
    0x0587: 'Derichs GmbH',
    0x0588: 'ALT-TEKNIK LLC',
    0x0589: 'Star Technologies',
    0x058a: 'START TODAY CO.,LTD.',
    0x058b: 'Maxim Integrated Products',
    0x058c: 'MERCK Kommanditgesellschaft auf Aktien',
    0x058d: 'Jungheinrich Aktiengesellschaft',
    0x058e: 'Oculus VR, LLC',
    0x058f: 'HENDON SEMICONDUCTORS PTY LTD',
    0x0590: 'Pur3 Ltd',
    0x0591: 'Viasat Group S.p.A.',
    0x0592: 'IZITHERM',
    0x0593: 'Spaulding Clinical Research',
    0x0594: 'Kohler Company',
    0x0595: 'Inor Process AB',
    0x0596: 'My Smart Blinds',
    0x0597: 'RadioPulse Inc',
    0x0598: 'rapitag GmbH',
    0x0599: 'Lazlo326, LLC.',
    0x059a: 'Teledyne Lecroy, Inc.',
    0x059b: 'Dataflow Systems Limited',
    0x059c: 'Macrogiga Electronics',
    0x059d: 'Tandem Diabetes Care',
    0x059e: 'Polycom, Inc.',
    0x059f: 'Fisher &amp; Paykel Healthcare',
    0x05a0: 'RCP Software Oy',
    0x05a1: 'Shanghai Xiaoyi Technology Co.,Ltd.',
    0x05a2: 'ADHERIUM(NZ) LIMITED',
    0x05a3: 'Axiomware Systems Incorporated',
    0x05a4: 'O. E. M. Controls, Inc.',
    0x05a5: 'Kiiroo BV',
    0x05a6: 'Telecon Mobile Limited',
    0x05a7: 'Sonos Inc',
    0x05a8: 'Tom Allebrandi Consulting',
    0x05a9: 'Monidor',
    0x05aa: 'Tramex Limited',
    0x05ab: 'Nofence AS',
    0x05ac: 'GoerTek Dynaudio Co., Ltd.',
    0x05ad: 'INIA',
    0x05ae: 'CARMATE MFG.CO.,LTD',
    0x05af: 'ONvocal',
    0x05b0: 'NewTec GmbH',
    0x05b1: 'Medallion Instrumentation Systems',
    0x05b2: 'CAREL INDUSTRIES S.P.A.',
    0x05b3: 'Parabit Systems, Inc.',
    0x05b4: 'White Horse Scientific ltd',
    0x05b5: 'verisilicon',
    0x05b6: 'Elecs Industry Co.,Ltd.',
    0x05b7: 'Beijing Pinecone Electronics Co.,Ltd.',
    0x05b8: 'Ambystoma Labs Inc.',
    0x05b9: 'Suzhou Pairlink Network Technology',
    0x05ba: 'igloohome',
    0x05bb: 'Oxford Metrics plc',
    0x05bc: 'Leviton Mfg. Co., Inc.',
    0x05bd: 'ULC Robotics Inc.',
    0x05be: 'RFID Global by Softwork SrL',
    0x05bf: 'Real-World-Systems Corporation',
    0x05c0: 'Nalu Medical, Inc.',
    0x05c1: 'P.I.Engineering',
    0x05c2: 'Grote Industries',
    0x05c3: 'Runtime, Inc.',
    0x05c4: 'Codecoup sp. z o.o. sp. k.',
    0x05c5: 'SELVE GmbH &amp; Co. KG',
    0x05c6: 'Smart Animal Training Systems, LLC',
    0x05c7: 'Lippert Components, INC',
    0x05c8: 'SOMFY SAS',
    0x05c9: 'TBS Electronics B.V.',
    0x05ca: 'MHL Custom Inc',
    0x05cb: 'LucentWear LLC',
    0x05cc: 'WATTS ELECTRONICS',
    0x05cd: 'RJ Brands LLC',
    0x05ce: 'V-ZUG Ltd',
    0x05cf: 'Biowatch SA',
    0x05d0: 'Anova Applied Electronics',
    0x05d1: 'Lindab AB',
    0x05d2: 'frogblue TECHNOLOGY GmbH',
    0x05d3: 'Acurable Limited',
    0x05d4: 'LAMPLIGHT Co., Ltd.',
    0x05d5: 'TEGAM, Inc.',
    0x05d6: 'Zhuhai Jieli technology Co.,Ltd',
    0x05d7: 'modum.io AG',
    0x05d8: 'Farm Jenny LLC',
    0x05d9: 'Toyo Electronics Corporation',
    0x05da: 'Applied Neural Research Corp',
    0x05db: 'Avid Identification Systems, Inc.',
    0x05dc: 'Petronics Inc.',
    0x05dd: 'essentim GmbH',
    0x05de: 'QT Medical INC.',
    0x05df: 'VIRTUALCLINIC.DIRECT LIMITED',
    0x05e0: 'Viper Design LLC',
    0x05e1: 'Human, Incorporated',
    0x05e2: 'stAPPtronics GmbH',
    0x05e3: 'Elemental Machines, Inc.',
    0x05e4: 'Taiyo Yuden Co., Ltd',
    0x05e5: 'INEO ENERGY&amp; SYSTEMS',
    0x05e6: 'Motion Instruments Inc.',
    0x05e7: 'PressurePro',
    0x05e8: 'COWBOY',
    0x05e9: 'iconmobile GmbH',
    0x05ea: 'ACS Control-System GmbH',
    0x05eb: 'Bayerische Motoren Werke AG',
    0x05ec: 'Gycom Svenska AB',
    0xffff: 'This value has special meaning depending on the context in which it used.\nLink Manager Protocol (LMP): '
            'This value may be used in the internal and interoperability tests before a Company ID has been assigned. '
            'This value shall not be used in shipping end products.\nDevice ID Profile: This value is reserved as the '
            'default vendor ID when no Device ID service record is present in a remote device.'
}

GAP_ADV_AD_TYPES = {
        0x01: 'Flags',
        0x02: 'Incomplete List of 16-bit Service Class UUIDs',
        0x03: 'Complete List of 16-bit Service Class UUIDs',
        0x04: 'Incomplete List of 32-bit Service Class UUIDs',
        0x05: 'Complete List of 32-bit Service Class UUIDs',
        0x06: 'Incomplete List of 128-bit Service Class UUIDs',
        0x07: 'Complete List of 128-bit Service Class UUIDs',
        0x08: 'Shortened Local Name',
        0x09: 'Complete Local Name',
        0x0A: 'Tx Power Level',
        0x0D: 'Class of Device',
        0x0E: 'Simple Pairing Hash C',
        0x0F: 'Simple Pairing Randomizer',
        0x10: 'Security Manager TK Value',
        0x11: 'Security Manager Out of Band Flags',
        0x12: 'Slave Connection Interval Range',
        0x14: 'List of 16-bit Service Solicitation UUIDs',
        0x1F: 'List of 32-bit Service Solicitation UUIDs',
        0x15: 'List of 128-bit Service Solicitation UUIDs',
        0x16: 'Service Data',
        0x20: 'Service Data - 32-bit UUID',
        0x21: 'Service Data - 128-bit UUID',
        0x17: 'Public Target Address',
        0x18: 'Random Target Address',
        0x19: 'Appearance',
        0x1A: 'Advertising Interval',
        0x1B: 'LE Bluetooth Device Address',
        0x1C: 'LE Role',
        0x1D: 'Simple Pairing Hash C-256',
        0x1E: 'Simple Pairing Randomizer R-256',
        0x3D: '3D Information Data',
        0xFF: 'Manufacturer Specific Data',
    }

GAP_ADV_TYPE_DESCRIPTIONS = {
    0x00: "Connectable and scannable undirected advertising (ADV_IND)",
    0x01: "Connectable high duty cycle directed advertising (ADV_DIRECT_IND, high duty cycle)",
    0x02: "Scannable undirected advertising (ADV_SCAN_IND)",
    0x03: "Non connectable undirected advertising (ADV_NONCONN_IND)",
    0x04: "Connectable low duty cycle directed advertising (ADV_DIRECT_IND, low duty cycle)"

}

GAP_ADV_TYPES = {
    "ADV_IND": 0x00,
    "ADV_DIRECT_IND": 0x01,
    "ADV_SCAN_IND": 0x02,
    "ADV_NONCONN_IND": 0x03,
    "ADV_DIRECT_IND": 0x04,
}

GAP_AD_FLAGS = (
    'LE Limited Discoverable Mode',
    'LE General Discoverable Mode',
    'BR/EDR Not Supported',
    'Simultaneous LE and BR/EDR (Controller)',
    'Simultaneous LE and BR/EDR (Host)',
    'Reserved', 'Reserved', 'Reserved',
)


def decode_manufacturer_specific_data(data):
    if len(data) < 2:
        raise Exception("Manufacturer specific data must be at least two bytes")

    mfgr, data = (data[0:2], data[2:])
    mfgr = '%04x' % unpack('<H', mfgr)

    mname = GAP_MANUFACTURERS.get(int(mfgr, 16))
    if mname is not None:
        mfgr = '%s (%s)' % (mfgr, mname)

    return (mfgr, data)


class GAP:
    fields = []
    types = {
        0x01: 'Flags',
        0x02: 'Incomplete List of 16-bit Service Class UUIDs',
        0x03: 'Complete List of 16-bit Service Class UUIDs',
        0x04: 'Incomplete List of 32-bit Service Class UUIDs',
        0x05: 'Complete List of 32-bit Service Class UUIDs',
        0x06: 'Incomplete List of 128-bit Service Class UUIDs',
        0x07: 'Complete List of 128-bit Service Class UUIDs',
        0x08: 'Shortened Local Name',
        0x09: 'Complete Local Name',
        0x0A: 'Tx Power Level',
        0x0D: 'Class of Device',
        0x0E: 'Simple Pairing Hash C',
        0x0F: 'Simple Pairing Randomizer',
        0x10: 'Security Manager TK Value',
        0x11: 'Security Manager Out of Band Flags',
        0x12: 'Slave Connection Interval Range',
        0x14: 'List of 16-bit Service Solicitation UUIDs',
        0x1F: 'List of 32-bit Service Solicitation UUIDs',
        0x15: 'List of 128-bit Service Solicitation UUIDs',
        0x16: 'Service Data',
        0x20: 'Service Data - 32-bit UUID',
        0x21: 'Service Data - 128-bit UUID',
        0x17: 'Public Target Address',
        0x18: 'Random Target Address',
        0x19: 'Appearance',
        0x1A: 'Advertising Interval',
        0x1B: 'LE Bluetooth Device Address',
        0x1C: 'LE Role',
        0x1D: 'Simple Pairing Hash C-256',
        0x1E: 'Simple Pairing Randomizer R-256',
        0x3D: '3D Information Data',
        0xFF: 'Manufacturer Specific Data',
    }

    decoder = {
        0x01: decode_flags,
        0x02: decode_uuid16,
        0x03: decode_uuid16,
        0x06: decode_uuid128,
        0x07: decode_uuid128,
        0x08: decode_name,
        0x09: decode_name,
        0x0A: decode_tx_power_level,
        0x12: decode_slave_connection_interval_range,
        0x16: decode_service_data,
        0xFF: decode_manufacturer_specific_data,
    }

    def __init__(self):
        pass

    def decode(self, data):
        self.fields = []
        pos = 0
        while pos < len(data):
            length = ord(data[pos])
            pos += 1
            if pos + length > len(data):
                raise Exception("Data too short (%d < %d)" % (pos + length, len(data)))
            data_type = ord(data[pos])
            value = data[pos + 1:pos + length]
            self.fields.append((data_type, value))
            pos += length

    def __repr__(self):
        pretty = []
        for data_type, value in self.fields:
            t = self.types.get(data_type, '%02X' % data_type)
            decoder = self.decoder.get(data_type, lambda x: repr(x))
            pretty.append('%s: %s' % (t, decoder(value)))
        return ', '.join(pretty)

    def gap_dict(self):
        gap = {}
        pretty = []
        for type, value in self.fields:
            t = self.types.get(type, '%02X' % type)
            decoder = self.decoder.get(type, lambda x: repr(x))
            pretty.append('%s: %s' % (t, decoder(value)))
            if t not in gap.keys():
                gap[t] = decoder(value)
            else:
                cur_val = gap[t]
                if value == cur_val:
                    continue
                if not isinstance(cur_val, list):
                    gap[t] = [cur_val, value]
                    continue
                gap[t].append(value)
        return gap
